Skip to content

Use initial value for default dashboard template name #11298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

agjohnson
Copy link
Contributor

@agjohnson agjohnson commented Apr 23, 2024

Solve bug https://read-the-docs.sentry.io/issues/5244784623/?project=148442&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=1h&stream_index=3&utc=true

  File "django/views/generic/list.py", line 174, in get
    context = self.get_context_data()
  File "readthedocs/projects/views/private.py", line 134, in get_context_data
    context["promotion"] = f"projects/partials/dashboard/{template_name}"
  UnboundLocalError: local variable 'template_name' referenced before assignment

@agjohnson agjohnson requested a review from a team as a code owner April 23, 2024 19:08
@agjohnson agjohnson added the PR: hotfix Pull request applied as hotfix to release label Apr 23, 2024
@agjohnson agjohnson requested a review from ericholscher April 23, 2024 19:08
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a basic test for this, but since this is under RTD_EXT_THEME_ENABLED test didn't catch it.

@agjohnson
Copy link
Contributor Author

agjohnson commented Apr 23, 2024

We need to start testing the repos with the new templates enabled and used, there will be a number of test failures when testing this way.

@humitos
Copy link
Member

humitos commented Apr 24, 2024

Thanks for taking care of this 👍🏼

@humitos humitos merged commit 1840922 into main Apr 24, 2024
7 checks passed
@humitos humitos deleted the agj/hotfix-dashboard-content branch April 24, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: hotfix Pull request applied as hotfix to release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants